//-------------这页面有2个Ajax请求 和 手动输入编号的处理----------------

//---------------------  单独的设备类别  -----------------------------
			$.ajax({
				type:"get",
				url:  uri_equipment_cotegory,
				async:true,
				success:function(info){
                    if(info.code != 0)
                    {
                        layui.use('layer', function(){
                            var layer = layui.layer;
                            layer.msg(info.msg, {skin:'tip_position',time:'3000'});
                        });
                        return;
                    }
					var dataArr = info.data;
					$("#equipmentCategory").empty();
					$.each(dataArr, function(index,value){
						$("#equipmentCategory").append("<option value="+value.id+">"+value.name+"</option>");
					});
				},
				error:function(){
                    layui.use('layer', function(){
                        var layer = layui.layer;
                        layer.msg('系统错误！！！', {skin:'tip_position',time:'3000'});
                    });
				}
			});

//-----------------  存放场所 下拉内容  -----------------------
			$.ajax({
				type:"get",
				url: uri_utilizationTemplate,
				async:true,
				success:function(info){
                    if(info.code != 0)
                    {
                        layui.use('layer', function(){
                            var layer = layui.layer;
                            layer.msg(info.msg, {skin:'tip_position',time:'3000'});
                        });
                        return;
                    }
					var dataArr = info.data;
					$("#utilizationTemplate").empty();
					$.each(dataArr, function(index,value){
						$("#utilizationTemplate").append("<option value="+value.id+">"+value.name+"</option>");
					});
				},
				error:function(){
                    layui.use('layer', function(){
                        var layer = layui.layer;
                        layer.msg('系统错误！！！', {skin:'tip_position',time:'3000'});
                    });
				}
			});
//-----------------  利用率模板下拉内容  -----------------------
			$.ajax({
				type:"get",
				url: uri_store_place,
				async:true,
				success:function(info){
					if(info.code != 0)
					{
						layui.use('layer', function(){
							var layer = layui.layer;
							layer.msg(info.msg, {skin:'tip_position',time:'3000'});
						});
						return;
					}
					var dataArr = info.data;
					$("#place").empty();
					$.each(dataArr, function(index,value){
						$("#place").append("<option value="+value.id+">"+value.name+"</option>");
					});
				},
				error:function(){
					layui.use('layer', function(){
						var layer = layui.layer;
						layer.msg('系统错误！！！', {skin:'tip_position',time:'3000'});
					});
				}
			});

//---------------点击设备编号，上面的加号  --------------------------------
			var str = undefined;
			//第一步：键盘事件 keyup
			$(document).keyup(function(){
				str = $("#equipmentNo").val();
			});
			//第二步：点击+ 显示我添加的设备编号
			$(".jia").eq(0).click(function(){
				//将字符串以 "逗号"分割
				$("#bianhao").empty();
				$("#bianhao").append('<span id="she">设备编号有：</span>');

				// (1)不能为空
				var val = $("#equipmentNo").val();
				if(val == ''){
					alert('设备编号不能为空');
					return;
				}
				//（2）只能是数字 和 逗号
				for(let i=0; i<val.length;i++)
				{
					//取出每一个字符
					var char = val.charAt(i);
					if( !(char>=0&&char<=9) && !(char==',' || char=='，' ))
					{
						alert('亲，只能输入数字和逗号哦');
						return;
					}
				}

                //（3）将中文逗号，替换成“ 英文逗号 ”
                var str1 = str.replace(/，/g,",");
                var str1Arr = str1.split(",");
                for(var m=0;m<str1Arr.length;m++)
                {
                    $("#bianhao").append( "<span class='xianBian'>"+str1Arr[m]+"</span>" );
                }

			});
